<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示和隐藏</title>
</head>

<body>
    <div id="app">
        <!-- v-show 通过添加样式 display: none; 来进行隐藏 -->
        <h1 v-show="show">看见我了吗？</h1>
        <button @click="modifyShow">点我切换显示</button>
    </div>
    <script type="module">
        import { createApp, ref } from "../00-dependency/vue.esm-browser.js"
        createApp({
            setup() {
                const modifyShow = () => {
                    show.value = !show.value
                }
                const show = ref(false)
                return {
                    show,
                    modifyShow
                }
            }
        }).mount("#app")
    </script>
</body>

</html>